#ifndef _WANGXUAN_LRU_LIST_H_
#define _WANGXUAN_LRU_LIST_H_

#include <list>
#include <vector>

using namespace std;

class Page;
typedef  list<Page*>::iterator  LRULISTPOS;

class LRUList
{
	friend class Page;
public:
	static LRUList* instance(){
		static LRUList theList;
		return &theList;
	};

	int update(Page* page);
	int remove(Page* page);
	int getLastPages(int c,vector<Page*>& vp);

	unsigned int size();
private:
	LRUList(){};
private:
	list<Page*> lp;
};

inline unsigned int LRUList::size(){
	return lp.size();
}

#endif

